package org.domain.acount.session;

import org.domain.acount.entity.*;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityHome;

@Name("contaHome")
public class ContaHome extends EntityHome<Conta> {

	public void setContaIdConta(Integer id) {
		setId(id);
	}

	public Integer getContaIdConta() {
		return (Integer) getId();
	}

	@Override
	protected Conta createInstance() {
		Conta conta = new Conta();
		return conta;
	}

	public void load() {
		if (isIdDefined()) {
			wire();
		}
	}
	
	public String remove() {
		super.remove();
		return "done";
	}

	public void wire() {
		getInstance();
	}

	public boolean isWired() {
		return true;
	}

	public Conta getDefinedInstance() {
		return isIdDefined() ? getInstance() : null;
	}

}
